<form name="activityEditForm" class="form-horizontal" novalidate>
    <style type="text/css">
        .disabled input {
            background: #f2f2f2;
        }

        .delspan {
            position: absolute;
            padding: 0px 5px;
            background: silver;
            cursor: pointer;
            border-radius: 50%;
            color: red;
            font-weight: bold;
            font-size: 10px;
            right: 0;
        }

        .delspan:hover {
            background: #e78f08;
        }
        /*解决富文本编辑框下拉选项无显示的问题*/
        .ui-popup-modal{
            z-index:100!important;
        }
        .ui-popup-backdrop{
            z-index:99!important;
        }
    </style>
    <div style="height:400px;width:950px;overflow-y:auto;overflow-x:hidden;">
        <div class="form-group mt10 clearfix">
            <div class="col-sm-8">
                <div class="form-group mt10 clearfix">
                    <span class="col-sm-4 control-label">楼盘名称<em class="c-red">*</em></span>

                    <div class="col-sm-8" style="margin-left: -45px;">
                        <div ui-project data="data.projectList"
                             ng-model="data.activity.building_id"
                             data-ng-disabled="data.activity.publish_status == 1"
                             ng-class="{disabled:data.activity.publish_status == 1}"
                             required name="building_id"></div>
                         <span role="alert"
                               ng-show="(activityEditForm.$submitted || activityEditForm.building_id.$touched) && activityEditForm.building_id.$error.required"
                               class="error ng-hide c-red lh30">楼盘名称不能为空</span>
                    </div>
                </div>
                <div class="form-group mt10 clearfix">
                    <span class="col-sm-4 control-label">认筹活动主题名称<em class="c-red">*</em></span>

                    <div class="col-sm-8" style="margin-left: -45px;">
                        <input ng-model="data.activity.name" class="input-text idDutyOfficer" type="text"
                               data-ng-disabled="data.activity.publish_status == 1"
                               maxlength="100"
                               required name="name" placeholder="认筹活动主题名称"/>
                    <span role="alert"
                          ng-show="(activityEditForm.$submitted || activityEditForm.name.$touched) && activityEditForm.name.$error.required"
                          class="error ng-hide c-red lh30">认筹活动主题名称不能为空</span>
                    </div>
                </div>

                <div class="form-group mt10 clearfix">
                    <span class="col-sm-4 control-label">认筹理财金额(元)</span>

                    <div class="col-sm-4" style="margin-left: -45px;">
                        <input value="{{ data.activity.rc_amount|number:2}}" class="input-text" type="text"
                               ng-disabled="true"
                               placeholder="认筹理财金额"/>
                    </div>
                    <div class="col-sm-4 mt5 c-gray" style="margin-left: -15px;">
                        认筹理财金额固定一万元
                    </div>
                </div>
                <div class="form-group mt10 clearfix">
                    <span class="col-sm-4 control-label">优惠信息<em class="c-red">*</em></span>

                    <div class="col-sm-8" style="margin-left: -45px;">
                        <input ng-model="data.activity.discount" class="input-text" type="text"
                               data-ng-disabled="data.activity.publish_status == 1" maxlength="100"
                               required name="discount"
                               placeholder="优惠信息(如：1万抵3万)"/>
                        <span role="alert"
                              ng-show="(activityEditForm.$submitted || activityEditForm.discount.$touched) && activityEditForm.discount.$error.required"
                              class="error ng-hide c-red lh30">优惠信息不能为空</span>
                    </div>
                </div>

                <div class="form-group mt10 clearfix">
                    <span class="col-sm-4 control-label">核心卖点</span>

                    <div class="col-sm-4" style="margin-left: -45px;">
                        <input ng-model="data.activity.sale_point1" class="input-text" type="text"
                               data-ng-disabled="data.activity.publish_status == 1" maxlength="15"
                               placeholder="核心卖点1(如：双地铁口)"/>
                    </div>
                    <div class="col-sm-4">
                        <input ng-model="data.activity.sale_point2" class="input-text" type="text"
                               data-ng-disabled="data.activity.publish_status == 1" maxlength="15"
                               placeholder="核心卖点2(如：优质学位房)"/>
                    </div>
                </div>
                <div class="form-group mt10 clearfix">
                    <span class="col-sm-4 control-label"></span>

                    <div class="col-sm-4" style="margin-left: -45px;">
                        <input ng-model="data.activity.sale_point3" class="input-text" type="text"
                               data-ng-disabled="data.activity.publish_status == 1" maxlength="15"
                               placeholder="核心卖点3"/>
                    </div>
                    <div class="col-sm-4">
                        <input ng-model="data.activity.sale_point4" class="input-text" type="text"
                               data-ng-disabled="data.activity.publish_status == 1" maxlength="15"
                               placeholder="核心卖点4"/>
                    </div>
                </div>
                <div class="form-group mt10 clearfix">
                    <span class="col-sm-4 control-label"></span>

                    <div class="col-sm-4" style="margin-left: -45px;">
                        <input ng-model="data.activity.sale_point5" class="input-text" type="text"
                               data-ng-disabled="data.activity.publish_status == 1" maxlength="15"
                               placeholder="核心卖点5"/>
                    </div>
                    <div class="col-sm-4">
                        <input ng-model="data.activity.sale_point6" class="input-text" type="text"
                               data-ng-disabled="data.activity.publish_status == 1" maxlength="15"
                               placeholder="核心卖点6"/>
                    </div>
                </div>

                <div class="form-group mt10 clearfix">
                    <span class="col-sm-4 control-label">认筹活动结束时间<em class="c-red">*</em></span>

                    <div class="col-sm-4" style="margin-left: -45px;">
                        <input type="text" class="input-date input-text" style="width:100%"
                               ui-date format="yyyy-MM-dd" required name="end_date" ng-model="data.activity.end_date"
                               placeholder="认筹活动结束日期"
                               data-ng-disabled="data.activity.publish_status == 1"
                                >
                        <span role="alert"
                              ng-show="(activityEditForm.$submitted || activityEditForm.end_date.$touched) && activityEditForm.end_date.$error.required"
                              class="error ng-hide c-red lh30">活动结束日期不能为空</span>
                    </div>
                    <div class="col-sm-4">
                        <input type="text" class="input-text" style="width:100%"
                               required name="end_time" ng-model="data.activity.end_time"
                               placeholder="认筹活动结束时间(如:12:00)"
                               data-ng-disabled="data.activity.publish_status == 1"
                                >
                        <span role="alert"
                              ng-show="(activityEditForm.$submitted || activityEditForm.end_time.$touched) && activityEditForm.end_time.$error.required"
                              class="error ng-hide c-red lh30">活动结束时间不能为空</span>
                        <span role="alert"
                              ng-show="(activityEditForm.$submitted || activityEditForm.end_time.$touched) && validTimeFormat()"
                              class="error ng-hide c-red lh30">活动结束时间无效</span>
                    </div>
                </div>
                <div class="form-group mt10 clearfix">
                    <span class="col-sm-4 control-label">已参与认筹数量显示</span>

                    <div class="col-sm-8" style="margin-left: -45px;">
                        <input ng-model="data.activity.teambuy_number" class="input-text" type="number"
                               data-ng-disabled="data.activity.publish_status == 1"
                               placeholder="已参与认筹数量显示(活动初始显示已参与人数)"
                               number min="0" integer name="teambuy_number"/>
                        <span role="alert"
                              ng-show="(activityEditForm.$submitted || activityEditForm.teambuy_number.$touched) && (activityEditForm.teambuy_number.$error.integer || activityEditForm.teambuy_number.$error.number)"
                              class="error ng-hide c-red lh30">已参与认筹数量必须为正整数</span>
                        <span role="alert"
                              ng-show="(activityEditForm.$submitted || activityEditForm.teambuy_number.$touched) && activityEditForm.teambuy_number.$error.min"
                              class="error ng-hide c-red lh30">已参与认筹数量必须为正整数</span>
                    </div>
                </div>
            </div>
            <div class="col-sm-4">
                <div>活动图片<em class="c-red">*</em></div>
                <div class="upload-wrap" ng-repeat="img in data.activity.imgList" ng-if="img.__type!='delete'">
                    <img ng-src="{{img.img_url}}" alt="">
                    <span class="delspan" ng-click="img.__type='delete'" title="删除图片"
                          ng-if="data.activity.publish_status != 1">x</span>
                </div>
                <p class="c-gray" style="clear:both;">推荐尺寸610像素*320像素,文件大小不超过100kb,支持jpg、png格式图片</p>
                <span role="alert"
                      ng-show="(activityEditForm.$submitted) && validImages()"
                      class="error ng-hide c-red lh30">活动图片不能为空</span>

                <div ng-show="data.activity.publish_status != 1">
                    <div ui-uploader is-image auto-upload ng-model="url" style="clear: both;"
                         state="uploader.state"
                         on-status-changed="uploadImages($data)"
                         thumbnail="preview"
                         extensions="jpg,png" maxfilesize="100kb"></div>

                    <div class="img-state ng-hide" ng-bind="uploader.state"
                         ng-show="!!uploader.state"></div>
                </div>

            </div>
        </div>
        <div class="form-group mt10 clearfix">
            <span class="col-sm-2 control-label" style="margin-left: 10px;">认筹确认单乙方名称<em class="c-red">*</em></span>

            <div class="col-sm-5" style="margin-left: -10px;padding-left: 21px;width:412px;">
                <input ng-model="data.activity.confirm_name" class="input-text" type="text" required name="confirm_name"
                       data-ng-disabled="data.activity.publish_status == 1"
                       maxlength="100"
                       placeholder="认筹确认单乙方名称(楼盘出售方)"/>
                <span role="alert"
                      ng-show="(activityEditForm.$submitted || activityEditForm.confirm_name.$touched) && activityEditForm.confirm_name.$error.required"
                      class="error ng-hide c-red lh30">认筹确认单乙方名称不能为空</span>
            </div>
        </div>
        <div class="form-group mt10 clearfix">
            <span class="col-sm-2 control-label" style="margin-left: 10px;">认筹确认单正文内容<em class="c-red">*</em></span>

            <div class="col-sm-10" style="margin-left: -10px;padding-left: 21px;">
                <div id="ue-raise-finance-content" class="editor" style="min-height:200px;" name="content" required
                     data-ng-disabled="data.activity.publish_status == 1"
                        ></div>
                <span role="alert"
                      ng-show="(activityEditForm.$submitted || activityEditForm.content.$touched) && validContent()"
                      class="error ng-hide c-red lh30">认筹确认单正文内容不能为空</span>
            </div>
        </div>
        <div class="form-group mt10 clearfix"
             ng-if="data.activity.publish_status != 1"
                >
            <span class="col-sm-2 control-label" style="margin-left: 10px;">是否立即上架</span>

            <div class="col-sm-5" style="margin-left: -10px;padding-left: 21px;">
                <div ng-switch ng-model="data.activity.onshelf"
                     data-ng-disabled="data.activity.publish_status == 1"
                        ></div>
            </div>
        </div>

    </div>

    <div class="form-group mt10 clearfix pt20 ml10"
         ng-if="data.activity.publish_status != 1"
            >
        <div class="col-sm-12">
            <input id="chklaw" type="checkbox" ui-checkbox ng-model="agree_law"
                   data-ng-disabled="data.activity.publish_status == 1"
                    >
            <label for="chklaw">我已阅读并同意</label>
            <a ng-click="showAgreement()"
               class="mt5 c-orange" style="cursor:pointer"
                    >《明源(腾讯"理财通"购房优惠活动)合作协议》</a>
        </div>

    </div>
</form>

